import axios from "axios";

const baseURL = 'http://localhost:802'
const instance = axios.create({ baseURL });

// 添加响应拦截器
instance.interceptors.response.use(
    result => {
        return result.data;
    },
    error => {
        alert('服务异常')
        return Promise.reject(error); // 异步的状态转换成失败的状态
    }
)


export default instance;